package com.car.web.controller.base;

import com.car.bean.OrderObj;
import com.car.util.AbstractValidator;

/**
 * date 2011-9-16 Company taobao
 * 
 * @author Figo
 * @version 1.0
 * 
 */
public class BaseVo extends AbstractValidator {

	private Long id;
	//private PageObj page = new PageObj();
	private OrderObj orderby = new OrderObj();
	private Integer currPage = 1;
	private String pageSize ;
	private String flag="";
	private String carFlag="";
	private String token;//授权标识
	private String loginName;

	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public Integer getCurrPage() {
		return currPage;
	}

	public void setCurrPage(Integer currPage) {
		this.currPage = currPage;
	}

	public BaseVo() {
		super();
	}

	public boolean validate() {
		return true;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

//	public PageObj getPage() {
//		return page;
//	}
//
//	public void setPage(PageObj page) {
//		this.page = page;
//	}

	public OrderObj getOrderby() {
		return orderby;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public void setOrderby(OrderObj orderby) {
		this.orderby = orderby;
	}

	public String getPageSize() {
		try {
			if(pageSize!=null){
				if(pageSize.indexOf(",")>-1){
					return  new Integer(pageSize.split(",")[0]).toString();
				}else{
					return new Integer(pageSize).toString();
				}
			}else{
				return "0";
			}
		} catch (Exception e) {
			return "0";
		}
	}

	public String getLoginName() {
		if(loginName!=null){
			return loginName.trim().toLowerCase();
		}
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public void setPageSize(String pageSize) {
		this.pageSize = pageSize;
	}

	public String getCarFlag() {
		return carFlag;
	}

	public void setCarFlag(String carFlag) {
		this.carFlag = carFlag;
	}

}
